home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / exec / remove.c < prev    next >
C/C++ Source or Header  |  1996-10-24  |  2KB  |  84 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remove.c,v 1.7 1996/10/24 15:50:56 aros Exp $
  4.     $Log: remove.c,v $
  5.     Revision 1.7  1996/10/24 15:50:56  aros
  6.     Use the official AROS macros over the __AROS versions.
  7.  
  8.     Revision 1.6  1996/10/21 20:48:22  aros
  9.     Changed struct SysBase to struct ExecBase
  10.  
  11.     Revision 1.5  1996/08/13 13:56:07  digulla
  12.     Replaced AROS_LA by AROS_LHA
  13.     Replaced some AROS_LH*I by AROS_LH*
  14.     Sorted and added includes
  15.  
  16.     Revision 1.4  1996/08/01 17:41:17  digulla
  17.     Added standard header for all files
  18.  
  19.     Desc:
  20.     Lang: english
  21. */
  22. #include "exec_intern.h"
  23.  
  24. /*****************************************************************************
  25.  
  26.     NAME */
  27.     #include <exec/lists.h>
  28.     #include <clib/exec_protos.h>
  29.  
  30.     AROS_LH1I(void, Remove,
  31.  
  32. /*  SYNOPSIS */
  33.     AROS_LHA(struct Node *, node, A1),
  34.  
  35. /*  LOCATION */
  36.     struct ExecBase *, SysBase, 42, Exec)
  37.  
  38. /*  FUNCTION
  39.     Remove a node from a list.
  40.  
  41.     INPUTS
  42.     node - This node to be removed.
  43.  
  44.     RESULT
  45.  
  46.     NOTES
  47.     There is no need to specify the list but the node must be in
  48.     a list !
  49.  
  50.     EXAMPLE
  51.     struct Node * node;
  52.  
  53.     // Remove node
  54.     Remove (node);
  55.  
  56.     BUGS
  57.  
  58.     SEE ALSO
  59.  
  60.     INTERNALS
  61.  
  62.     HISTORY
  63.     26-08-95    digulla created after EXEC-Routine
  64.     26-10-95    digulla adjusted to new calling scheme
  65.  
  66. ******************************************************************************/
  67. {
  68.     AROS_LIBFUNC_INIT
  69.     assert (node);
  70.     /*
  71.     Unfortunately, there is no (quick) check that the node
  72.     is in a list.
  73.     */
  74.  
  75.     /*
  76.     Just bend the pointers around the node, ie. we make our
  77.     predecessor point to out successor and vice versa
  78.     */
  79.     node->ln_Pred->ln_Succ = node->ln_Succ;
  80.     node->ln_Succ->ln_Pred = node->ln_Pred;
  81.     AROS_LIBFUNC_EXIT
  82. } /* Remove */
  83.  
  84.